Common Task Service
This service contains methods in order to work with common tasks of TimePunch. Common Tasks can be used in any project.
GetActiveCommonTasks
This method loads all common tasks that are active. Active tasks are such which have no delete flag set.
List<TaskDto> GetActiveCommonTasks(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | commonTasks@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | Collection of active common tasks |
GetAllCommonTasks
This method load all common tasks, independently if they are marked as deleted or not.
List<TaskDto> GetAllCommonTasks(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | commonTasks@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | Collection of common tasks |
ImportTasks
This method imports the transferred activities. In contrast to the Save method, the activities are not mapped by ID, but by name.
List<TaskDto> ImportTasks(
out TpFault fault,
TpAuthentication authentication,
List<TaskDto> tasks);
Needed Permission | commonTasks@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
tasks | Collection of common tasks to import | |
Return Value | Returns a collection of all common tasks |
LoadCommonTask
This method loads a single task. This can be useful if one has to reload a deleted task for a single time entry.
TaskDto LoadCommonTask(
out TpFault fault,
TpAuthentication authentication,
Guid taskId);
Needed Permission | commonTasks@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return value | The loaded task |
SaveCommonTasks
This method stores the common task list to the database. It’s important that the list contains all active tasks. Tasks that are not within the list, will be marked as deleted automatically.
void SaveCommonTasks(
out TpFault fault,
TpAuthentication authentication,
IEnumerable<TaskDto> tasks);
Needed Permission | commonTasks@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
tasks | Collection of active common tasks |
SetTaskLifeCycle
This method sets the life cycle for the list of transferred tasks.
void SetTaskLifeCycle(
out TpFault fault,
TpAuthentication authentication,
Guid[] taskIds,
TaskLifeCycle taskLifeCycle);
Needed Permission | projects@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
taskIds | Collection of task ids to set the life cylce | |
taskLifeCycle | Life cylce to set for the task ids |